<?php include FCPATH.'application/views/backend/_photo_editor.php';?>
<form action="/backend/project/update" method="post" class="entry-form">
    <div class="photo-uploader-container">
        <div class="form-row" id="photo-uploader"></div>
        <a href="javascript:void(0);" id="photo-uploader-button">上传</a>
        <div class="thumb-setting">
            <label>缩略图</label>
            &nbsp;&nbsp;宽 ：<input type="text" name="thumb_width" value="0"/>
            &nbsp;&nbsp;高 ：<input type="text" name="thumb_height" value="366"/>
            <span class="tip">请在选择图片前设置缩略图大小</span>
        </div>
    </div>

    <input type="hidden" name="id" value="<?php echo $project->id;?>"/>
    <input type="hidden" name="album" value="<?php echo $project->album;?>"/>
    <div class="form-row">
        类型
        <select name="type">
            <?php foreach ($types as $type): ?>
                <option value="<?php echo $type->id; ?>"<?php echo $type->id==$project->type?'selected="selected"':'';?>><?php echo $type->value; ?></option>
            <?php endforeach; ?>
        </select>
        年份
        <select name="year">
            <?php for ($i = intval(date('Y')); $i >= 2002; $i--): ?>
                <option value="<?php echo $i; ?>"<?php echo $i==$project->year?'selected="selected"':'';?>><?php echo $i; ?></option>
            <?php endfor; ?>
        </select>
        区域
        <select name="area">
            <?php foreach ($areas as $area): ?>
                <option value="<?php echo $area->id; ?>"<?php echo $area->id==$project->area?'selected="selected"':'';?>><?php echo $area->value; ?></option>
            <?php endforeach; ?>
        </select>
        首页显示
        <input type="checkbox" name="display" value="1" <?php echo $project->display==1?'checked="checked"':'';?>/>
    </div>
    <ul class="tab-button">
        <li><a href="javascript:void(0);" style="width:150px;">中文</a></li>
        <li><a href="javascript:void(0);" style="width:150px;">English</a></li>
    </ul>
    <div class="tab-content">
        <div class="form-row">
            <label>标题</label>
            <input type="text" class="text" name="title" value="<?php echo $project->title;?>" style="width:500px;"/>
        </div>
        <div class="form-row">
            <textarea name="content" cols="30" rows="5" style="margin-left:90px;width:500px;height:260px;"><?php echo $project->content;?></textarea>
        </div>
    </div>
    <div class="tab-content">
        <div class="form-row">
            <label>Title</label>
            <input type="text" class="text" name="title_en" value="<?php echo $project->title_en;?>" style="width:500px;"/>
        </div>
        <div class="form-row">
            <textarea name="content_en" cols="30" rows="5"style="margin-left:90px;width:500px;height:260px;"><?php echo $project->content_en;?></textarea>
        </div>
    </div>

    <div class="form-button">
        <input type="submit" class="submit" name="submit" value="提交"/>
    </div>

</form>